package test.Sorting;

//查找回文数
public class Palindromic {

    public static boolean isPalindrome(int x) {
        if (x < 0){
            return false;
        }
        int cur = 0;
        int num = x;
        while (num != 0){
            cur = cur*10 + num%10;
            num/=10;
        }
        return cur==x;
    }
}
